package com.ym.im.service.friendship.controller;

import com.ym.im.common.ResponseVO;
import com.ym.im.service.friendship.model.req.*;
import com.ym.im.service.friendship.service.ImFriendService;
import com.ym.im.service.friendship.service.ImFriendShipRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("v1/friendshipRequest")
public class ImFriendShipRequestController {

    @Autowired
    ImFriendShipRequestService imFriendShipRequestService;

    @RequestMapping("approveFriendRequest")
    public ResponseVO approveFriendRequest(@RequestBody @Validated ApproverFriendRequestReq req, Integer appId){
        req.setAppId(appId);
        return imFriendShipRequestService.approveFriendRequest(req);
    }


}
